﻿<Window x:Class="WpfStudy.StudyStyleSelector"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:WpfStudy"
        Title="StudyStyleSelector" Height="300" Width="500">
    <Window.Resources>
        <Style x:Key="jasonStyle" TargetType="ListBoxItem">
            <Setter Property="FontWeight" Value="Bold"></Setter>
        </Style>
        <Style x:Key="otherStyle" TargetType="ListBoxItem">
            <Setter Property="FontWeight" Value="Thin"></Setter>
            <Setter Property="Foreground" Value="Blue"></Setter>
        </Style>
    </Window.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
        </Grid.RowDefinitions>
        
        <ListBox x:Name="lstCustomer">
            <ListBox.ItemContainerStyleSelector>
                <local:NameStyleSelector></local:NameStyleSelector>
            </ListBox.ItemContainerStyleSelector>
        </ListBox>
        <Button Grid.Row="1" Width="120" Height="25" Margin="10" Content="Load Data" Click="Button_Click_1"></Button>
    </Grid>
</Window>
